import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    redirect: '/home/mune',  // 重定向:重新指向其它path,会改变网址
  },{
    path:"/home",
    component:()=>import ("../page/Home.vue"),
    children:[
      {
        path:"/home/shouye",
        component:()=>import ("../page/Shouye.vue"),
      },
      {
        path:"/home/mune",
        component:()=>import ("../page/Mune.vue"),
      },
      {
        path:"/home/dingdan",
        component:()=>import ("../page/Dingdan.vue"),
      },
      {
        path:"/home/shop",
        component:()=>import ("../page/Shop.vue"),
      },
      {
        path:"/home/main",
        component:()=>import ("../page/Main.vue"),
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
